package main

import (
	"fmt"
	"math/rand"
	"time"
)

func main() {
	//1.设置随机数种子
	rand.Seed(time.Now().Unix())

	//2.生成随机数,范围[0,3)
	x := rand.Intn(3)
	fmt.Println(x)
}
